{% extends 'layout.html' %}

<!-- 当前页面的css样式 -->
{% block css %}
    <style>
        ul {
            list-style-type: none;
            padding: 0;
        }

        ul li {
            float: left;
            padding: 10px;
            padding-left: 0;
            width: 80px;
        }

        ul li i {
            font-size: 18px;
            margin-left: 5px;
            color: #6d6565;
        }
    </style>
{% endblock %}

<!-- 当前页面：通用的编辑信息页面 -->
{% block content %}
    <div class="content-container">
        <form class="form-horizontal" method="post" novalidate>
            {% csrf_token %}
            {% for field in form %}
                <div class="form-group">
                    <label class="col-sm-2 control-label">{{ field.label }}</label>
                    <div class="col-sm-8">
                        {{ field }}
                        <span style="color: red;">{{ field.errors.0 }}</span>
                    </div>
                </div>
            {% endfor %}
            <div class="form-group">
                <div class="col-md-offset-2 col-md-8">
                    <input type="submit" value="保存" class="btn btn-primary form-control">
                </div>
            </div>
        </form>
    </div>
{% endblock %}